home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / vecanim.zip / VECBUILD.DOC < prev    next >
Text File  |  1994-07-31  |  12KB  |  303 lines

  1.  
  2.  
  3.  
  4.                               VECTOR  BUILDER
  5.                                 Version 0.9
  6.  
  7.                        Guide to Building New Objects
  8.  
  9.  
  10.                      Copyright (c) 1994 - Bjarke Viksoe
  11.                              All Rights Reserved
  12.  
  13.  
  14.                               Shareware Version
  15.                              Released july 1994!
  16.  
  17.  
  18.  
  19.  
  20. ────────────────────────────────────────────────────────────────────────────
  21. Table of Contents
  22. ────────────────────────────────────────────────────────────────────────────
  23.  
  24. 1. Introduction
  25. 2. Hardware and Software Requirements
  26. 3. How it works
  27. 4. The File Format
  28. 5. How to Build Your Own Animation
  29. 6. The End
  30.  
  31.  
  32. ────────────────────────────────────────────────────────────────────────────
  33. 1. Introduction
  34. ────────────────────────────────────────────────────────────────────────────
  35.  
  36. So this is the program where you can build up your animations. But why 
  37. isn't this piece of program not within the actual animator?
  38.  
  39. That's because you cannot change the structure of your animation once
  40. you start adding more frames to it. Adding more polygons to an animation
  41. with more that one frame isn't possible! The VECTOR BUILDER only accepts
  42. animations with ONE frame. So plan your animations carefully before you
  43. go ahead and do the actual animations.
  44.  
  45. But of course you can store and retrieve, modify and add more polygons
  46. to an animations as long as there are only 1 frame. This can be done
  47. in this program, the VECTOR BUILDER.
  48.  
  49. Creation of animations seems a bit tricky and boring.
  50. Anyway, this wasn't really ment to be a simple animation program. This is
  51. a program for game development or demo creation.
  52.  
  53. People how find this program usefull should mail me for the source-code to
  54. make their own, much better and improved, editor to their games or demos.
  55.  
  56.  
  57. ────────────────────────────────────────────────────────────────────────────
  58. 2. Hardware and Software Requirements
  59. ────────────────────────────────────────────────────────────────────────────
  60.  
  61. VECTOR BUILDER requires version 3.20 or higher version of MS- or PC-DOS, 
  62. an IBM or compatible 80386 or above computer with a VGA adapter, a 
  63. Microsoft or compatible 2-button mouse, and some 2Mb of memory.
  64. The program works best with a hard disk drive and disk caching, 
  65. which improves file save/retrieve performance and a computer using VESA bus 
  66. architecture which greatly improves the video performance. Slow VGA cards
  67. are not recommended.
  68.  
  69. Note that VECTOR BUILDER utilize a tweaked 320x200 256-color screen for
  70. flicker-free screen updates! Your VGA card must support this - and most do!
  71.  
  72. If you experience any trouble with this software they are encouraged to 
  73. notify the developer.
  74.  
  75.  
  76. ────────────────────────────────────────────────────────────────────────────
  77. 3. How it works
  78. ────────────────────────────────────────────────────────────────────────────
  79.  
  80. The Object Builder looks a bit like the Animator part. First you see
  81. the "DISK" button on the menu. Clicking this only two possible choises
  82. can be activated (for now). "New Anim" creates a brand new animation and
  83. "Load Anim" retrieves an animation from disk.
  84.  
  85. The uppper right part of the menu is just as boring as in the Animator. 
  86. Use "Edit" to enter the editor screen once you have created a face.
  87.  
  88. The lower part of the menu has 3 buttons. One for creating the objects,
  89. one for creating new faces and another for deleting stuff.
  90.  
  91. You can only save your animation when you have one or more points in
  92. your animation.
  93.  
  94. The editor screen look pretty much the same as in the VECTOR ANIMATOR.
  95. Read the documentation in the "VECANIM.DOC" documentation file to 
  96. figure out what it does or enjoy the "5. How to Build Your Own Animation" 
  97. section below to get an introduction to a builder's guide to the 
  98. vector wonder.
  99.  
  100.  
  101. ────────────────────────────────────────────────────────────────────────────
  102. 4. The File Format
  103. ────────────────────────────────────────────────────────────────────────────
  104.  
  105. There is a few limitations to this program:
  106.  
  107. {it can max handle 500 frames}
  108.      MAXFRAMES = 500;
  109. {when you create your first frame you shouldn't make more than 200
  110.  faces and objects}
  111.      MAXFACES = 200;
  112. {it can only handle 600 coordinates which should be enough for most
  113.  objects}
  114.      MAXCOORDS = 600;
  115.  
  116.  
  117. The actual .ANI file is divided into several chunks. First there is the
  118. header chunk, which describe the animation title, number of frames, number
  119. of faces/objects and the number of coordinates for one frame.
  120.  
  121. Next is the face chunk. Here all static information about faces/objects are
  122. stored. This is names, colours and number of coordinates used by the face.
  123. Faces are stored one by one as an array of face-records. The number of
  124. records in this array can be found in the integer "total_faces" in the
  125. header-chunk.
  126.  
  127. Then there is the frame chunk. It descibes characteristics about every
  128. frame. Currently only one piece of information is stored here - 
  129. the number of steps to be calculated between the frame and the next frame
  130. in sequence.
  131.  
  132. Next is the "Instance" chunk. It store information of how faces changes
  133. from one frame to another. Faces might become invisible or change their
  134. z-value. There is one instance-record for every face saved in the 
  135. face-chunk.
  136.  
  137. Finally comes the coordinates. They are listed in big arrays starting
  138. with index 1. This should match the data in the face-chunk. "Start_Coord"
  139. is the index where a polygons coordinates start and "Number_coords" is
  140. the amount of coordinates from that it uses.
  141. Eg. a face has "Start_coord" set to 2 and "Number_coords" is 4. This
  142. should turn into a square polygon formed from the points (p2,p3), (p3,p4),
  143. (p4,p5) and (p5,p2) when rendered on the display.
  144. The amount of coordinate-pairs stored in this chunk can be read in the 
  145. header-chunk under "total_coords".
  146.  
  147. Each chunk is separated by an identifier string. It is NOT a Pascal or
  148. C null-string, but simply an array of characters.
  149.  
  150.  
  151. The .ANI file consist of:
  152.  
  153. 1.   An identifying string: "VEC-ANIM"
  154. 1.1  The animation header:
  155.        {format version - currently only #1 is supported}
  156.          version : byte;
  157.        {date: month,day,year of last saved time-stamp}
  158.          m,d,y : word;
  159.        {animation title Pascal-string - max 12 chars}
  160.          title : nametype;
  161.        {this is the replay rate = number of screen-updates/second}
  162.          rate : integer;
  163.        {number of frames in whole animation}
  164.          total_frames : integer; 
  165.        {total number of faces and objects in a single frame}
  166.          total_faces : integer; 
  167.        {next is the number of coordinates used for a single frame}
  168.          total_coords : integer; 
  169.        {set next pointer to NIL}
  170.          face : pFaceArray; 
  171.        {and also this to NIL}
  172.          frame : pFrameRec; 
  173.        {this is a colour array starting with colour #0 and ending with
  174.        number 255. Colours are split up into their R,G and B values which
  175.        range between 0 and 63}
  176.          rgb : array[1..256*3] of byte; 
  177.  
  178. 2.1  Face-identifyer: "FACES"
  179. 2.2  Faces array of "total_faces" records:
  180.        {name of the face in a Pascal string[12]}
  181.          name : nametype;
  182.        {type of face: face or object}
  183.          FaceType : facemodes;
  184.        {hierachy}
  185.          parent,brother,child : integer;
  186.        {actual RGB color index (0=color #0, 1=color #1 and so on...
  187.         To find the RGB-values in the header RGB-array use: (color*3)+1}
  188.          color : byte;
  189.        {color to drawn with in editor. Range between 0 and 15. Uses
  190.         BGI colour-constants. 0=black and 15=white!}
  191.          vcolor : byte;
  192.        {polygons coordinates should be taken from coordinate-array from
  193.         index "start_coord" and count "number_coords" coordinates}
  194.          start_coord : integer;
  195.          number_coords : integer;
  196.  
  197. 3.1  Frame-identifyer: "FRAME"
  198. 3.2  Frames:
  199.        {number of steps between frames}
  200.          step : integer
  201.  
  202. 4.1  Instace identifying string: "INSTANCE"
  203. 4.2  Instances are stored as an array of "total_faces" records. "total_faces"
  204.      can be found in the header-chunk.
  205.        {Is this instance of the face visible?}
  206.          visible : boolean;
  207.        {z-coord}
  208.          z : integer;
  209.  
  210. 5.1  Coord identifying string: "COORD"
  211. 5.2  Finally the coordinates are stored:
  212.        {coords are store in a array of integers. One coord-pair after
  213.        another. Look in the header under "total_coords" for the actual
  214.        number of coords stored in this chuck}
  215.          x,y : integer;
  216.  
  217. 6.   End-string: "END"
  218.  
  219.  
  220. Now this was the file-format for a single-framed animation. If you wish
  221. to have more frames (that is, you wish to read a file containing more
  222. frames) this is the way to do it:
  223.   A. Look for steps 1. to 2.2 as usual
  224.   B. For every frame do 3.1 and 3.2
  225.   C. For every frame do 4.1 and 4.2
  226.   D. For every frame do 5.1 and 5.2
  227.   E. Finally do step 6.
  228.  
  229.  
  230. ────────────────────────────────────────────────────────────────────────────
  231. 5. How to Build Your Own Animation
  232. ────────────────────────────────────────────────────────────────────────────
  233.  
  234. The best way to go about making a new animation is to draw a sketch on a
  235. piece of paper. Draw a sketch of the frame. Make sure you have all possible
  236. polygons plotted down. Also line out how many points each polygon should
  237. have.
  238.  
  239. Load the "VECTOR BUILDER" and choose "New Anim" under "Disk". You are now
  240. prompted for a title.
  241.  
  242. Start by adding the objects you find obvious. Making objects helps you 
  243. with grouping faces, but might slow down the selection stage for 
  244. individual faces.
  245.  
  246. When all objects are placed, create the first face. "Add face" will ask
  247. you for a name and the number of coordinates your polygon needs. When
  248. you have entered new values for this, a blue circle (depending on
  249. the number of coords you have chosen) will pop up on your display-screen.
  250. This is a template of your face. You should alter its form later.
  251.  
  252. Jump to the Editor Screen. Choose "VIEW" and find your new face in the
  253. list. Choose it and change colour and editor colour. You should also change
  254. the z-value while you're at it.
  255.  
  256. Leave the "VIEW" window. The newly created face has its points selected
  257. on the wire-frame display, but still looks a bit funny. You can now
  258. "EDIT" the points to look what you had in mind.
  259.  
  260. Go back to the main screen and create a new face and return to
  261. the editor screen for editing. Do so for all faces.
  262.  
  263. While editing new faces you should check once in a while to see if it
  264. looks all right in the final frame (by "SHOW"ing the animation).
  265. Remember the difference between the two screen resolutions.
  266.  
  267. When done save the animation under "Save Anim" at the "Disk" option.
  268. Load the VECTOR ANIMATOR and start animating!
  269.  
  270. Happy animating...
  271.  
  272.  
  273. ────────────────────────────────────────────────────────────────────────────
  274. 6. The End
  275. ────────────────────────────────────────────────────────────────────────────
  276.  
  277. The Builder was coded in a single day and might still be quite buggy.
  278. Most of the stuff done, has to do with really strange pointer-operations.
  279. It was allmost impossible to keep track of everything.
  280.  
  281. Anyway, if you manage to create anything useful with these programs, send
  282. a sample to me. I would be really happy then.
  283.  
  284.  
  285. How to contact me:
  286.  
  287. If you for any reason wish to contact me, write to:
  288.  
  289. Bjarke Viksoe
  290. Norrebred 139
  291. 2625 Vallensbaek
  292. Denmark
  293.  
  294. Or e-mail me in 1994 to : dat92230@rix02.lyngbyes.dk
  295.  
  296.  
  297.  
  298.        ┌───────────────────────────┐
  299.        │Wanna beat orgasm          │ Bjarke Viksoe
  300.        │            try bit-pushing│ dat92230@rix02.lyngbyes.dk
  301.        └───────────────────────────┘
  302.  
  303.